package com.lei.singleton;

/**
 * @author: leiGer
 * @Date: 2021/06/27
 * @Time: 22:58
 */

/**
 * 解决线程安全，防止反序列化
 */
public enum  Mgr08 {
    INSTANCE;
    public static void main(String[] args) {
        for (int i = 0; i < 100; i++) {
            new Thread(()->{
                System.out.println(Mgr08.INSTANCE.hashCode());
            }).start();
        }

    }

}
